#include <stdio.h>
#include <assert.h>

int lower_one_mask(int n){
    return (int) ((unsigned) -1 >> ((sizeof(int) << 3) - n));
}


int main(){

    assert(lower_one_mask(2) == 0x3);
    assert(lower_one_mask(3) == 0x7);
    assert(lower_one_mask(32) == -1);

    return 0;
}
